package demo3;

public class Tax {
	// 计算应缴税额，由于国家最新纳税标准（系数），属于某一时期的特定固定值，与实例化对象没有关系，所以定义为静态方法
	static double getTax(double money) {
		double TaxReceivable = 0;
		if (0 <= money && money <= 5000) {
			TaxReceivable = 0;
		}
		if (5000 < money && money <= 8000) {
			TaxReceivable = money * 0.03;
		}
		if (8000 < money && money <= 17000) {
			TaxReceivable = money * 0.10;
		}
		if (17000 < money && money <= 30000) {
			TaxReceivable = money * 0.20;
		}
		if (30000 < money && money <= 40000) {
			TaxReceivable = money * 0.25;
		}
		final double TaxReceivable1 = TaxReceivable;
		return TaxReceivable1;
	}
}